#include <stdio.h>
int main(){
    int I=0;
    int bonus=0;
    printf("Please enter profit\n");
    scanf("%d",&I);
    int value=I/100000;
    if (value>10){value=10;}
    switch(value){
    case 0:
        bonus=I*0.1;
        printf("%d\n",bonus);
        break;
    case 1:
        bonus=(I-100000)*0.075+100000*0.1;
        printf("%d\n",bonus);
        break;
    case 2:
    case 3:
        bonus=(I-200000)*0.05+100000*0.1+100000*0.075;
        printf("%d\n",bonus);
        break;
    case 4:
    case 5:
        bonus=(I-400000)*0.03+100000*0.1+100000*0.075+200000*0.05;
        printf("%d\n",bonus);
        break;
    case 6:
    case 7:
    case 8:
    case 9:
        bonus=(I-600000)*0.015+100000*0.1+100000*0.075+200000*0.05+200000*0.03;
        printf("%d\n",bonus);
        break;
    case 10:
        bonus=(I-1000000)*0.01+100000*0.1+100000*0.075+200000*0.05+200000*0.03+400000*0.015;
        printf("%d\n",bonus);
        break;
    }
    return 0;
}